import { defineStore } from 'pinia'
import { SelfStorage } from '@/utils/secureLs'

export const useAuthStore = defineStore('authStore', {
    state: () => ({
        token: '',
        userInfo: {
            adminAvatar: '',
            adminId: 0,
            adminNickname: '',
            adminRole: []
        } as UserInfoModel
    }),
    persist: {
        key: 'AUTH',
        storage: SelfStorage
    }
})
